<?php
namespace Home\Controller;

use Think\Controller;

/**
 * 产品促销信息控制器
 * User: xupeng
 * Date: 2016/7/6
 * Time: 15:05
 */
class PromotionController extends LoginBaseController{

    public function promotionlist(){
        $this->assign('page_name', "产品促销信息列表页");
        $this->display('promotion/promotionlist');
    }

    /**
     * 显示商品添加界面
     */
    public function addpromotion(){
        $this->assign('page_name', "商品促销信息新增页");
        $this->assign('operate_name', '新增商品促销信息');
        $this->display('promotion/addpromotion');
    }

    /**
     * 显示商品编辑界面
     */
    public function updatepromotion(){
        $promotion = M('promotion', '', 'DB_product')->where('promotion_id = "%s"', array(I('promotion_id')))->find();
        $this->assign('operate_name', '更新商品促销信息');
        $this->assign('promotion', $promotion);
        $this->assign('page_name', "商品促销信息修改页");
        $this->display('promotion/addpromotion');
    }

}

?>